﻿using Blog.Core.Domain.Model;
using Blog.Core.DTO;
using Blog.Core.DTO.ViewModel;
using Blog.Core.DTO.ViewModel.From;
using Blog.Core.IRepositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Blog.Core.IServices
{
    public interface IFromService:IBaseService<FromInfo>
    {
        /// <summary>
        /// 表单的添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> InsertFrom(RequestFromDTO model);
        /// <summary>
        /// 根据用户名找到用户的表单
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>

        Task<ResponseResultDTO<List<FromInfo>>> GetFromList(string? name, int pageindex = 1, int pagesize = 10);
        /// <summary>
        /// 表单的修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> UpdateFrom(RequestFromDTO model);
    }
}
